import pandas as pd
from geoDist import geoLoc

colnames = ["realName","gender","university","school","major","degree","age","hometown","height","hobby","expect","tel","wechatID","email","photo","suggest"]
all_form = pd.read_excel("enrollment.xlsx",usecols="G:V",names=colnames,dtype="string")
record_num = len(all_form)
for i in range(0,record_num):
    (all_form.at[i,'lng'], all_form.at[i,'lat']) = geoLoc(all_form.at[i,"hometown"])
all_form.to_excel("include_LngLat.xlsx",index=False)
print("LngLat_form has been generated!")